<!-- jQuery -->
<script src="<?php  echo Yii::app()->params['static_url']; ?>js/jscolor/jscolor.js"></script>
<script>
     function changeLayout()
    {
        var strUrl = "<?php echo  Url::createUrl('tool/changeLayout')?>";
        $.ajax({
            type: "POST",
            url: strUrl,
            data: {
                icon_w:$("#icon_w").val(),
                icon_h:$("#icon_h").val(),
                bg_color:$("#bg_color").val(),
                text_color:$("#text_color").val(),
                intro_text_color:$("#intro_text_color").val(),
                link_color:$("#link_color").val(),
                border_type:$("#border_type").val(),
                border_size:$("#border_size").val(),
                border_color:$("#border_color").val(),
                padding_size:$("#padding_size").val(),
            },
            success: function(msg){
                if(msg !=""){
                    $("#item_selected").html(msg);
                }
            }          
        });
    }        
</script>
<!-- box menu -->
<?php $this->renderPartial("application.views.layouts._menu");?>
<!-- End box menu -->

<?php 
     $items = $_SESSION["items"];
    foreach($items as $key=>$value){
        $item = $value;
        break;
    }
    //$type_display = LoadConfig::$type_display;
    $type_display = $_SESSION["type_display"] ;
    $title_embed  = $_SESSION["title_embed"] ;
?>
<div class="about">
        <?php $this->widget("BoxLogin");?>
        <h1><a><img src="<?php  echo Yii::app()->params['static_url']; ?>images/tenweb-icon-banner.png" alt="" class="kc_TB_td" /></a>
        <a href="#" class="xanhdam">Tạo mã nhúng</a>
        </h1>
       <div class="Tma">
        <div class="Tma_1">
            <a href="#" class="button_Tma_2">1</a><a href="#" class="denxam">Chọn sản phẩm</a>
            &nbsp;&nbsp;&nbsp;
            <a href="#" class="button_Tma_2">2</a><a href="#" class="denxam">Chọn kiểu hiện thị</a>
            &nbsp;&nbsp;&nbsp;
            <a href="#" class="button_Tma">3</a><a href="#" class="denxam">Chọn giao diện</a>
            &nbsp;&nbsp;&nbsp;
            <a href="#" class="button_Tma_2">4</a><a href="#" class="denxam">Lấy mã nhúng</a>
        </div>
      </div>
      <div>
            <h2><img src="<?php  echo Yii::app()->params['static_url']; ?>images/tenweb-icon-taomanhung-giaodien.png" alt="" width="14" height="16" class="kc_TB_td" />Chọn Giao Diện</h2>  
    </div>
<form name="embedStep2Form" action="<?php echo  Url::createUrl('tool/embedStep3')?>" method="post"> 
             <div class="CGD_2">Tiêu đề:
                   <?php
     echo $title_embed;
?>
            </div>

            <div  id="item_selected" >                      
                    <?php $this->renderPartial("tpl_display_code_tmp",array("item"=>$item,"type"=>$type_display,"radio"=>0,"layout"=>array()))?>
            </div>
            
            <div class="CGD_2">
                    <div class="CGD_2_left">Đổ màu nền</div>
                    <div class="CGD_2_right">
                    <input id="bg_color" name="bg_color" class="color" value="#e5f4d3" style="height:22px;width: 100px;border:1px solid#cccccc; padding-left:3px;font-size:12px;margin:0 5px 0 27px;" onchange="changeLayout()"/>
                    </div>
                    <div class="both"></div>
            </div>
            <div class="CGD_2">
                    <div class="CGD_2_left">Chọn màu chữ</div>
                    <div class="CGD_2_right" style="margin-left:10px;">
                        <span style="display: inline-block;text-align: right;width: 100px;">Link title</span>
                        <span><input id="text_color" name="text_color" class="color" value="#333" style="height:22px;width: 100px;border:1px solid#cccccc; padding-left:3px;font-size:12px;margin:0 5px 0 27px;background-color : #333333;" onchange="changeLayout()"/></span><br/>
                    
                        <span style="display: inline-block;text-align: right;width: 100px;">Text mô tả</span>
                        <span><input id="intro_text_color" name="intro_text_color" class="color" value="#444"  style="height:22px;width: 100px;border:1px solid#cccccc; padding-left:3px;font-size:12px;margin:0 5px 0 27px;" onchange="changeLayout()"/></span> <br/> 
                    
                        <span style="display: inline-block;text-align: right;width: 100px;">Link tải</span>
                        <spam><input id="link_color" name="link_color" class="color" value="#e40500" style="height:22px;width: 100px;border:1px solid#cccccc; padding-left:3px;font-size:12px;margin:0 5px 0 27px;" onchange="changeLayout()" /></spam>      
                    </div>
                    <div class="both"></div>
            </div>
            <div class="CGD_2">
                    <div class="CGD_2_left">Tạo viền</div>
                    <div class="CGD_2_right" style="margin-left:53px;">
                        <span style="display: inline-block;text-align: right;width: 100px;">Loại viền:</span>
                        <span>
                        <select id="border_type" name="border_type" class="box_CGD_2_c" style="margin:0 5px 0 27px;" onchange="changeLayout()">
                        <option value="solid" selected="selected">Viền Solid ____</option>
                        <option value="dotted">Viền chấm . . . .</option>
                        <option value="dashed">Viền đứt - - - -</option>
                        <option value="double">Viền đôi ==== </option>
                        </select>
                        </span><br />
                        
                        <span style="display: inline-block;text-align: right;width: 100px;">Kích cỡ</span>
                        <span>
                        
                        <input name="border_size" id="border_size" type="text" size="10" maxlength="10" class="box_CGD_2_d" style="margin:0 5px 0 27px;" value="<?php echo LoadConfig::$type_display[$type_display]["border_size"];?>" onchange="changeLayout()"/>
                        VD:15px</span><br />
                        <span style="display: inline-block;text-align: right;width: 100px;">Màu viền</span>
                        <span>
                        <input id="border_color" name="border_color" class="color" value="#c3e296" style="height:22px;width: 100px;border:1px solid#cccccc; padding-left:3px;font-size:12px;margin:0 5px 0 27px;" onchange="changeLayout()"/>
                        </span><br />
                    </div>
                    <div class="both"></div>
            </div>
            <div class="CGD_2">
                    <div class="CGD_2_left">Căn lề</div>
                    <div class="CGD_2_right">
                        <input name="padding_size" id="padding_size" type="text" size="10" maxlength="10" class="box_CGD_2_d" style="margin:0 5px 0 67px;" value="<?php echo LoadConfig::$type_display[$type_display]["padding_size"];?>" onchange="changeLayout()"/> VD: 15px
                    </div>
                    <div class="both"></div>
            </div>
            <div class="Tma_8">
                    <input type="submit" class="button_DNHT_1" value="Hoàn thành" name="submit_b3">
                    <a href="<?php echo Url::createUrl("tool/embedStep2") ?>" class="button_DNHT_2">Quay lại</a>
            </div>
             <div class="Tma_9">
          <img src="<?php  echo Yii::app()->params['static_url']; ?>images/tenweb-icon-DS-ma-nhung.png" alt="" width="11" height="13" class="kc_TB_td" />Danh Sách Mã Nhúng
        </div>

        <div class="Tma_10">
         <ul>
           
            <li>
            <a href="#"><img src="<?php  echo Yii::app()->params['static_url']; ?>images/tenweb-icon-cacloaimanhung.png" alt="" width="24" height="16" class="kc_TB_td" />Bộ Game Online chia sẻ % khủng</a>
            </li>
             <li>
            <a href="#"><img src="<?php  echo Yii::app()->params['static_url']; ?>images/tenweb-icon-cacloaimanhung.png" alt="" width="24" height="16" class="kc_TB_td" />Bộ game hút SMS 2013</a>
            </li>
             <li>
            <a href="#"><img src="<?php  echo Yii::app()->params['static_url']; ?>images/tenweb-icon-cacloaimanhung.png" alt="" width="24" height="16" class="kc_TB_td" />Những Game Hot 2012 (Hút SMS và Thẻ)</a>
            </li>
             <li>
            <a href="#"><img src="<?php  echo Yii::app()->params['static_url']; ?>images/tenweb-icon-cacloaimanhung.png" alt="" width="24" height="16" class="kc_TB_td" />Game Online hút tiền khủng</a>
            </li>
             <li>
            <a href="#"><img src="<?php  echo Yii::app()->params['static_url']; ?>images/tenweb-icon-cacloaimanhung.png" alt="" width="24" height="16" class="kc_TB_td" />Bộ game offline hút sms khủng</a>
            </li>
             <li>
            <a href="#"><img src="<?php  echo Yii::app()->params['static_url']; ?>images/tenweb-icon-cacloaimanhung.png" alt="" width="24" height="16" class="kc_TB_td" />Bộ game giải trí nhẹ nhàng hút tiền khủng</a>
            </li>
             <li>
            <a href="#"><img src="<?php  echo Yii::app()->params['static_url']; ?>images/tenweb-icon-cacloaimanhung.png" alt="" width="24" height="16" class="kc_TB_td" />Bộ game bài cực đỉnh</a>
            </li>
             <li>
            <a href="#"><img src="<?php  echo Yii::app()->params['static_url']; ?>images/tenweb-icon-cacloaimanhung.png" alt="" width="24" height="16" class="kc_TB_td" />Game giả cổ 3d đặc sắc</a>
            </li>
        </ul>
        </div>
     </form>
</div>